import request from '@/utils/request'
// 获取组织架构
export function getDepartment() {
    return request({
        url: '/company/department'
    })
}
// 获取部门负责人的数据
export function getManagerList() {
    return request({
        url: '/sys/user/simple'
    })
}
// 新增组织
export function addDepartment(data) {
    return request({
        url: '/company/department',
        method: 'post',
        data
    })
}
// 修改组织（回显数据，查找详情）
export function getDepartmentDetail(id) {
    return request({
        url: `/company/department/${id}`
    })
}
// 修改组织
export function updateDepartment(data) {
    return request({
        method: 'put',
        url: `/company/department/${data.id}`,
        data
    })
}

// 删除组织
export function delDepartment(id) {
    return request({
        method: 'delete',
        url: `/company/department/${id}`
    })
}
